<template>
    <div>
        <el-table
            :header-cell-style="{background:'#eef1f6',color:'#606266'}"
            ref="multipleTable"
            :data="getRefundData"
            stripe
            tooltip-effect="dark"
            style="width: 100%"
            >
    
                <el-table-column
                align='center'
                prop="orders_no"
                label="订单号"
                width="120">
                </el-table-column>
                <el-table-column
                align='center'
                prop="refund.chargeback_no"
                label="退单号"
                width="120">
                </el-table-column>
                <el-table-column
                align='center'
                prop="goods_type"
                label="商品">
                </el-table-column>
                <el-table-column
                align='center'
                prop="user_id"
                label="申请用户"
                >
                </el-table-column>
                <el-table-column
                align='center'
                prop="orders_total"
                label="退款金额"
                >
                </el-table-column>
                <el-table-column
                align='center'
                prop="refund.application_time"
                label="申请时间"
                >
                </el-table-column>
                <el-table-column
                scope=scope
                align='center'
                prop=""
                label="操作">
                <template slot-scope="scope">
                    <el-button type="primary" @click="checkDetails(scope.row)">查看详情</el-button>
                </template>
                </el-table-column>
    </el-table>
    <el-pagination
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
      :current-page.sync="nowPage"
      :page-sizes="[5, 10, 30, 50]"
      :page-size="perPageNum"
      layout="sizes, prev, pager, next"
      :total = total1>
    </el-pagination>
    </div>
    
  
</template>

<script>
export default {
    name:'RefundTable',
    data() {
        return {
            nowPage:1,
            perPageNum:5,
            total1:1,
        }
    },
    computed: {
        getRefundData(){
            return this.$store.state.RefundData.tableData;
        }
    },
    methods: {
        checkDetails(row){
           this.$emit('addTabs1')
           console.log(row);
           this.$store.dispatch('changeRefundDetailsDataA',row)
        },
         handleSizeChange(val){
            console.log(val);
            this.perPageNum=val;
            this.getTableData(this.nowPage, this.perPageNum)
            this.getTableData(this.nowPage, this.perPageNum)
        },
        handleCurrentChange(val){
            this.nowPage=val;
            this.getTableData(this.nowPage, this.perPageNum)
        },
        
    },
    created() {
        this.$store.dispatch('changedataActions')
        
    },
    

}
</script>

<style>
.el-pagination { text-align: center; }

</style>